.halo-comment.dark {
  color-scheme: dark;
  --color-prettylights-syntax-comment: #8b949e;
  --color-prettylights-syntax-constant: #79c0ff;
  --color-prettylights-syntax-entity: #d2a8ff;
  --color-prettylights-syntax-storage-modifier-import: #c9d1d9;
  --color-prettylights-syntax-entity-tag: #7ee787;
  --color-prettylights-syntax-keyword: #ff7b72;
  --color-prettylights-syntax-string: #a5d6ff;
  --color-prettylights-syntax-variable: #ffa657;
  --color-prettylights-syntax-brackethighlighter-unmatched: #f85149;
  --color-prettylights-syntax-invalid-illegal-text: #f0f6fc;
  --color-prettylights-syntax-invalid-illegal-bg: #8e1519;
  --color-prettylights-syntax-carriage-return-text: #f0f6fc;
  --color-prettylights-syntax-carriage-return-bg: #b62324;
  --color-prettylights-syntax-string-regexp: #7ee787;
  --color-prettylights-syntax-markup-list: #f2cc60;
  --color-prettylights-syntax-markup-heading: #1f6feb;
  --color-prettylights-syntax-markup-italic: #c9d1d9;
  --color-prettylights-syntax-markup-bold: #c9d1d9;
  --color-prettylights-syntax-markup-deleted-text: #ffdcd7;
  --color-prettylights-syntax-markup-deleted-bg: #67060c;
  --color-prettylights-syntax-markup-inserted-text: #aff5b4;
  --color-prettylights-syntax-markup-inserted-bg: #033a16;
  --color-prettylights-syntax-markup-changed-text: #ffdfb6;
  --color-prettylights-syntax-markup-changed-bg: #5a1e02;
  --color-prettylights-syntax-markup-ignored-text: #c9d1d9;
  --color-prettylights-syntax-markup-ignored-bg: #1158c7;
  --color-prettylights-syntax-meta-diff-range: #d2a8ff;
  --color-prettylights-syntax-brackethighlighter-angle: #8b949e;
  --color-prettylights-syntax-sublimelinter-gutter-mark: #484f58;
  --color-prettylights-syntax-constant-other-reference-link: #a5d6ff;
  --color-fg-default: #c9d1d9;
  --color-fg-muted: #8b949e;
  --color-fg-subtle: #484f58;
  --color-canvas-default: #0d1117;
  --color-canvas-subtle: #161b22;
  --color-border-default: #30363d;
  --color-border-muted: #21262d;
  --color-neutral-muted: rgba(110, 118, 129, 0.4);
  --color-accent-fg: #58a6ff;
  --color-accent-emphasis: #1f6feb;
  --color-attention-subtle: rgba(187, 128, 9, 0.15);
  --color-danger-fg: #f85149;

  // custom
  --color-input-background: #2c2e33;
  --color-input-text: #c1c2c5;
}

.halo-comment.light {
  color-scheme: light;
  --color-prettylights-syntax-comment: #6e7781;
  --color-prettylights-syntax-constant: #0550ae;
  --color-prettylights-syntax-entity: #8250df;
  --color-prettylights-syntax-storage-modifier-import: #24292f;
  --color-prettylights-syntax-entity-tag: #116329;
  --color-prettylights-syntax-keyword: #cf222e;
  --color-prettylights-syntax-string: #0a3069;
  --color-prettylights-syntax-variable: #953800;
  --color-prettylights-syntax-brackethighlighter-unmatched: #82071e;
  --color-prettylights-syntax-invalid-illegal-text: #f6f8fa;
  --color-prettylights-syntax-invalid-illegal-bg: #82071e;
  --color-prettylights-syntax-carriage-return-text: #f6f8fa;
  --color-prettylights-syntax-carriage-return-bg: #cf222e;
  --color-prettylights-syntax-string-regexp: #116329;
  --color-prettylights-syntax-markup-list: #3b2300;
  --color-prettylights-syntax-markup-heading: #0550ae;
  --color-prettylights-syntax-markup-italic: #24292f;
  --color-prettylights-syntax-markup-bold: #24292f;
  --color-prettylights-syntax-markup-deleted-text: #82071e;
  --color-prettylights-syntax-markup-deleted-bg: #ffebe9;
  --color-prettylights-syntax-markup-inserted-text: #116329;
  --color-prettylights-syntax-markup-inserted-bg: #dafbe1;
  --color-prettylights-syntax-markup-changed-text: #953800;
  --color-prettylights-syntax-markup-changed-bg: #ffd8b5;
  --color-prettylights-syntax-markup-ignored-text: #eaeef2;
  --color-prettylights-syntax-markup-ignored-bg: #0550ae;
  --color-prettylights-syntax-meta-diff-range: #8250df;
  --color-prettylights-syntax-brackethighlighter-angle: #57606a;
  --color-prettylights-syntax-sublimelinter-gutter-mark: #8c959f;
  --color-prettylights-syntax-constant-other-reference-link: #0a3069;
  --color-fg-default: #24292f;
  --color-fg-muted: #57606a;
  --color-fg-subtle: #6e7781;
  --color-canvas-default: #ffffff;
  --color-canvas-subtle: #f6f8fa;
  --color-border-default: #d0d7de;
  --color-border-muted: #f5f8fa;
  --color-neutral-muted: rgba(175, 184, 193, 0.2);
  --color-accent-fg: #0969da;
  --color-accent-emphasis: #0969da;
  --color-attention-subtle: #fff8c5;
  --color-danger-fg: #cf222e;
  --color-input-background: #fff;
  --color-input-text: #333;
}

.halo-comment {
  position: relative;
  font-size: 14px;
  margin: 0 auto;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: transparent;
  font-family: -apple-system,BlinkMacSystemFont,"Segoe UI",Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji";

  button,
  input,
  textarea {
    -webkit-appearance: none;
    outline: none;
    -webkit-tap-highlight-color: rgba(0, 0, 0, 0);

    &:focus {
      outline: none;
    }
  }

  .avatar {
    @apply rounded-full;
    @apply block;
    @apply cursor-pointer;
    object-fit: cover;
    width: 48px;
    height: 48px;
    transition: all 0.8s;

    &:hover {
      transform: rotate(360deg);
    }
  }

  .comment-editor {
    position: relative;
    z-index: 1;
    animation: top20 500ms;

    .inner {
      margin: auto;
    }
  }

  .comment-form input,
  .comment-form textarea {
    box-shadow: none;
    border: 1px solid var(--color-border-muted);
    border-radius: 3px;
    box-sizing: border-box;
    padding: 5px 10px;
    resize: vertical;
    background: var(--color-input-background);
    color: var(--color-input-text);

    &:focus {
      border-color: var(--color-fg-subtle);
    }
  }

  .comment-textarea {
    width: 100%;

    textarea {
      font-size: 14px;
      min-height: 90px;
      transition: all 0.15s ease-in-out;
      overflow: hidden;
      overflow-wrap: break-word;
    }
  }

  .comment-preview {
    position: relative;
    min-height: 90px;
    box-shadow: none;
    border: 1px solid var(--color-border-muted);
    border-radius: 2px;
    box-sizing: border-box;
    padding: 5px 10px;
    overflow-wrap: break-word;

    img {
      max-width: 50%;
    }

    p {
      margin: 0;
    }
  }

  .comment-empty {
    margin: 30px 0;
    text-align: center;
    color: #8899a6;
  }

  .comment-nodes {
    animation: top20 1000ms;

    position: relative;

    .comment-editor {
      animation: bottom20 500ms;
    }
  }

  .comment-nodes .index-1 {
    overflow: hidden;
    margin-top: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-border-muted);

    & > .children-nodes {
      margin-left: 55px;
    }

    .children-nodes {
      .avatar {
        width: 42px;
        height: 42px;
      }
    }
  }

  .comment-nodes li:last-child {
    border: 0;
  }

  .comment-nodes .commentator a:after,
  .comment-nodes .commentator a:before {
    display: none;
  }

  .comment-body {
    position: relative;
    margin: 0 auto;
    padding: 0;
  }

  .comment-main {
    margin-left: 58px;
  }

  .comment-ref {
    @apply transition-all;
    animation: breath 1s ease-in-out infinite;
  }

  .comment-meta {
    line-height: 1;

    .useragent-info {
      margin-top: 6px;
      font-size: 12px;
      color: #657786;
    }
  }

  .comment-author {
    font-size: 14px;

    .author-name {
      font-size: 16px;
      font-weight: 700;
      color: #666;
    }
  }

  .comment-time {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    color: #657786;
  }

  .comment-content {
    padding: 15px 15px 15px 0;
    font-size: 14px;

    p {
      margin: 0;

      img {
        max-width: 50%;
      }
    }
  }

  .comment-alert {
    margin-top: 10px;
  }

  .alert {
    animation: top20 500ms;
    border-radius: 4px;
    padding: 8px 16px;
    background-color: #f44336;
    color: white;
    opacity: 1;
    transition: opacity 0.6s;
    margin-bottom: 15px;

    &.success {
      background-color: #4caf50;
    }

    &.info {
      background-color: #2196f3;
    }

    &.warning {
      background-color: #ff9800;
    }

    .closebtn {
      margin-left: 15px;
      color: #fff;
      font-weight: bold;
      float: right;
      font-size: 22px;
      line-height: 16px;
      cursor: pointer;
      transition: 0.3s;

      &:hover {
        color: black;
      }
    }
  }

  @media only screen and (max-width: 576px) {
    .author-info {
      input {
        width: 100%;
        margin-right: 0;
        margin-bottom: 5px;
      }
    }
  }

  @keyframes top20 {
    0% {
      opacity: 0;
      transform: translateY(-20px);
    }

    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes bottom20 {
    0% {
      opacity: 0;
      transform: translateY(20px);
    }

    100% {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes breath {
    0% {
      transform: scale(0.98);
      opacity: 0.8;
    }
    50% {
      transform: scale(1);
      opacity: 1;
    }
    100% {
      transform: scale(0.98);
      opacity: 0.8;
    }
  }
}
